package org.ljf.dto;

import org.ljf.dao.SuccessKilled;
import org.ljf.stateEnum.SecKillStateEnum;

/**
 * @创建人 lIUJF
 * @创建时间 2018/12/20
 * @描述:封装秒杀执行后结果
 */
public class SecKillEcution {
	private long secKillId;
	//秒杀执行结果状态
	private int state;
	//状态表示
	private String stateInfo;
	//秒杀成功对象
	private SuccessKilled successKilled;

	public SecKillEcution(long secKillId, SecKillStateEnum stateEnum,  SuccessKilled successKilled){
		this.secKillId = secKillId;
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.successKilled = successKilled;
	}

	public SecKillEcution(long secKillId, SecKillStateEnum stateEnum){
		this.secKillId = secKillId;
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}

	public long getSecKillId(){
		return secKillId;
	}

	public void setSecKillId(long secKillId){
		this.secKillId = secKillId;
	}

	public int getState(){
		return state;
	}

	public void setState(int state){
		this.state = state;
	}

	public String getStateInfo(){
		return stateInfo;
	}

	public void setStateInfo(String stateInfo){
		this.stateInfo = stateInfo;
	}

	public SuccessKilled getSuccessKilled(){
		return successKilled;
	}

	public void setSuccessKilled(SuccessKilled successKilled){
		this.successKilled = successKilled;
	}
}
